const {Sequelize} = require('sequelize')

const sequelize = new Sequelize({
    dialect: 'sqlite',
    storage: './camera.db'
});


(
    async () => {
        try {
            await sequelize.authenticate()
            console.log(`sqlite链接成功`)
        } catch (e) {
            console.log(`sqlite连接失败！${e.message}`)
        }
    }
)();

module.exports = sequelize